/**
 * 
 */
package verifiers;

import java.awt.Color;

import javax.swing.InputVerifier;
import javax.swing.JComponent;
import javax.swing.JTextPane;


public class NameVerifier extends InputVerifier {
	
	@Override
	public boolean verify(JComponent input) {
		String value = ((JTextPane) input).getText();

		if(value == null || value.trim().equals("")){ 
			input.setBackground(Color.red);
			return false;
		}
		else{
			input.setBackground(Color.white);
			return true;
			
		}
		
	}
	
}
